import { Component, ContentChild, Input, TemplateRef } from '@angular/core';
import { CommonModule } from '@angular/common';
import { Item } from '../app.component';

@Component({
  selector: 'app-list',
  standalone: true,
  imports: [CommonModule],
  templateUrl: './list.component.html',
  styleUrls: ['./list.component.css'],
})
export class ListComponent {
  @Input() items: Item[] = [];

  @ContentChild('listTemplate', { read: TemplateRef })
  listTemplate: TemplateRef<any> | null = null;
}
